//
//  BigImageCollectionViewcell.m
//  ExploreWorld
//
//  Created by dlios on 15-7-14.
//  Copyright (c) 2015年 chenlin. All rights reserved.
//

#import "BigImageCollectionViewcell.h"
#import "UIImageView+WebCache.h"

@implementation BigImageCollectionViewcell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.BigImagetitle = [[UILabel alloc]init];
        [self.contentView addSubview:self.BigImagetitle];
        [self.BigImagetitle sizeToFit];
        [self.BigImagetitle release];
        self.BigImagetitle.backgroundColor = [UIColor clearColor];
        
        self.bigImg = [[UIImageView alloc]init];
        [self.contentView addSubview:self.bigImg];
        self.bigImg.backgroundColor = [UIColor cyanColor];
        [self.bigImg release];

        
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    CGRect rectB = CGRectMake(0, 0,self.contentView.frame.size.width,200);
    self.bigImg.frame = rectB;
    CGRect rectA = CGRectMake(0, self.bigImg.frame.size.height-10, self.contentView.frame.size.width - 100, 40);
    self.BigImagetitle.frame = rectA;


}

- (void)setNm:(NewsModel *)nm{
    _nm = nm;
    [self.bigImg sd_setImageWithURL:[NSURL URLWithString:nm.imgsrc]];
    self.BigImagetitle.text = nm.title;
    
}

@end
